<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LiftSimu: /Users/alrik/Documents/workspace/LiftSimu/src/Lift.java Quellcode</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="up.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiftSimu
   
   </div>
   <div id="projectbrief">die Simulation einer Liftanlage</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Erzeugt von Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Suchen');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Hauptseite</span></a></li>
      <li><a href="annotated.html"><span>Klassen</span></a></li>
      <li class="current"><a href="files.html"><span>Dateien</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Suchen" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Auflistung&#160;der&#160;Dateien</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Alle</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Klassen</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Dateien</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funktionen</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variablen</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">/Users/alrik/Documents/workspace/LiftSimu/src/Lift.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_lift_8java.html">gehe zur Dokumentation dieser Datei</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00021"></a><a class="code" href="class_lift.html">00021</a> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_lift.html" title="die Klasse der Liftsteuerung">Lift</a>{
<a name="l00022"></a>00022    
<a name="l00023"></a><a class="code" href="class_lift.html#a0555effae63c54e4bf24b348b03f8e3c">00023</a>    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a0555effae63c54e4bf24b348b03f8e3c">etagen</a>=9;
<a name="l00024"></a><a class="code" href="class_lift.html#a0cad9b68208b05d4580777ee3c7c27bc">00024</a>    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a0cad9b68208b05d4580777ee3c7c27bc">overloadborder</a>=13;
<a name="l00025"></a>00025    
<a name="l00026"></a><a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">00026</a>    <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[];
<a name="l00027"></a><a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">00027</a>    <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[];
<a name="l00028"></a><a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">00028</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[];
<a name="l00029"></a>00029    
<a name="l00030"></a><a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">00030</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>;
<a name="l00031"></a><a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">00031</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>;
<a name="l00032"></a><a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">00032</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>;
<a name="l00033"></a><a class="code" href="class_lift.html#ab29c7e8ef3faea551eb5ef24bb3c7125">00033</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#ab29c7e8ef3faea551eb5ef24bb3c7125">time</a>;
<a name="l00034"></a><a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">00034</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>;
<a name="l00035"></a><a class="code" href="class_lift.html#a97537e6a914809b5f46d91288a65561c">00035</a>    <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a97537e6a914809b5f46d91288a65561c">timeinterruptflag</a>;
<a name="l00036"></a><a class="code" href="class_lift.html#a6e564a0132855e9598ce58fcfdaad5dd">00036</a>    <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a6e564a0132855e9598ce58fcfdaad5dd">bewegung</a>;
<a name="l00037"></a><a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">00037</a>    <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>;
<a name="l00038"></a><a class="code" href="class_lift.html#a268968b53ed0097ca8959929fdcf3662">00038</a>    <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a268968b53ed0097ca8959929fdcf3662">showOverloadwithpeople</a>;
<a name="l00039"></a><a class="code" href="class_lift.html#a1c4c16afa36ab041a47cfda5cffdb948">00039</a>    <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a1c4c16afa36ab041a47cfda5cffdb948">displayoverload</a>;
<a name="l00040"></a>00040    
<a name="l00041"></a><a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">00041</a>    <span class="keyword">public</span> <a class="code" href="class_lift_1_1_door_close_action.html" title="die Klasse zum Schließen der Türen (seperater Thread)">DoorCloseAction</a> <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>;
<a name="l00042"></a><a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">00042</a>    <span class="keyword">public</span> <a class="code" href="class_lift_1_1_door_open_action.html" title="die Klasse zum Öffnen der Türen (seperater Thread)">DoorOpenAction</a> <a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>;
<a name="l00043"></a><a class="code" href="class_lift.html#a73ae93ec883441df2c4bbb4629eab66f">00043</a>    <span class="keyword">public</span> <a class="code" href="class_lift_1_1_overload_action.html" title="die Klasse für die Überlastbehandlung, sie läuft als seperater Thread">OverloadAction</a> <a class="code" href="class_lift.html#a73ae93ec883441df2c4bbb4629eab66f">overloadAction</a>;
<a name="l00044"></a><a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">00044</a>    <span class="keyword">public</span> <a class="code" href="class_lift_1_1_interrupt_action.html" title="Der Ablauf für den Countdown.">InterruptAction</a> <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>;
<a name="l00045"></a><a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">00045</a>    <span class="keyword">public</span> <a class="code" href="class_lift_1_1_cabine_drive_action.html" title="die Klasse der Ablaufsteuerung">CabineDriveAction</a> <a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>;
<a name="l00046"></a>00046    
<a name="l00052"></a><a class="code" href="class_lift.html#a0d2f8152376de6fd4bb495cb118ea563">00052</a>    <span class="keyword">public</span> <a class="code" href="class_lift.html#a0d2f8152376de6fd4bb495cb118ea563" title="Der Konstruktor.">Lift</a>(){
<a name="l00053"></a>00053       <a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>=<span class="keyword">new</span> <span class="keywordtype">boolean</span>[<a class="code" href="class_lift.html#a0555effae63c54e4bf24b348b03f8e3c">etagen</a>];
<a name="l00054"></a>00054       <a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>=<span class="keyword">new</span> <span class="keywordtype">boolean</span>[<a class="code" href="class_lift.html#a0555effae63c54e4bf24b348b03f8e3c">etagen</a>];
<a name="l00055"></a>00055       <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>=<span class="keyword">new</span> <span class="keywordtype">int</span>[<a class="code" href="class_lift.html#a0555effae63c54e4bf24b348b03f8e3c">etagen</a>];
<a name="l00056"></a>00056       <a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>=1;
<a name="l00057"></a>00057       <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>=0;
<a name="l00058"></a>00058       <a class="code" href="class_lift.html#a6e564a0132855e9598ce58fcfdaad5dd">bewegung</a>=<span class="keyword">false</span>;
<a name="l00059"></a>00059       <a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>=0;
<a name="l00060"></a>00060       <a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>=0;
<a name="l00061"></a>00061       <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>=<span class="keyword">true</span>;
<a name="l00062"></a>00062       <a class="code" href="class_lift.html#ab29c7e8ef3faea551eb5ef24bb3c7125">time</a>=-1;
<a name="l00063"></a>00063       <a class="code" href="class_lift.html#a97537e6a914809b5f46d91288a65561c">timeinterruptflag</a>=<span class="keyword">false</span>;
<a name="l00064"></a>00064       <a class="code" href="class_lift.html#a1c4c16afa36ab041a47cfda5cffdb948">displayoverload</a>=<span class="keyword">false</span>;
<a name="l00065"></a>00065       this.<a class="code" href="class_lift.html#ae05401f4554e01bea9d1956b4d3fdf91" title="leitet das öffnen der Türen ein">openDoors</a>();
<a name="l00066"></a>00066    }
<a name="l00067"></a>00067       
<a name="l00075"></a><a class="code" href="class_lift.html#a7b83cf513187aa271a340903e480b155">00075</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span>[] <a class="code" href="class_lift.html#a7b83cf513187aa271a340903e480b155" title="Infos zu den Rufen Hoch.">returnhoch</a>(){
<a name="l00076"></a>00076       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>;
<a name="l00077"></a>00077    }
<a name="l00078"></a>00078    
<a name="l00086"></a><a class="code" href="class_lift.html#a7b7920206aac782eb45debe215a7e42e">00086</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span>[] <a class="code" href="class_lift.html#a7b7920206aac782eb45debe215a7e42e" title="Infos zu den Rufen Hoch.">returnrunter</a>(){
<a name="l00087"></a>00087       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>;
<a name="l00088"></a>00088    }
<a name="l00089"></a>00089    
<a name="l00097"></a><a class="code" href="class_lift.html#a638cbab6bc9e2b8d105980e1a91ef92f">00097</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span>[] <a class="code" href="class_lift.html#a638cbab6bc9e2b8d105980e1a91ef92f" title="Infos zu den Fahrtwünschen.">returnpeoplerequest</a>(){
<a name="l00098"></a>00098       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>;
<a name="l00099"></a>00099    }
<a name="l00100"></a>00100    
<a name="l00108"></a><a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a">00108</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">isARequestoverme</a>(){
<a name="l00109"></a>00109       <span class="keywordtype">int</span> tmpEtage=<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>+1;
<a name="l00110"></a>00110       <span class="keywordflow">while</span>(tmpEtage&lt;10){
<a name="l00111"></a>00111          <span class="keywordflow">if</span>((<a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[tmpEtage-1]==<span class="keyword">true</span>) || (<a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[tmpEtage-1]==<span class="keyword">true</span>) || (<a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[tmpEtage-1]!=0)){
<a name="l00112"></a>00112             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00113"></a>00113          }
<a name="l00114"></a>00114          tmpEtage++;
<a name="l00115"></a>00115       }
<a name="l00116"></a>00116       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00117"></a>00117    }
<a name="l00118"></a>00118    
<a name="l00126"></a><a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd">00126</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>(){
<a name="l00127"></a>00127       <span class="keywordtype">int</span> tmpEtage=<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1;
<a name="l00128"></a>00128       <span class="keywordflow">while</span>(tmpEtage&gt;0){
<a name="l00129"></a>00129          <span class="keywordflow">if</span>((<a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[tmpEtage-1]==<span class="keyword">true</span>) || (<a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[tmpEtage-1]==<span class="keyword">true</span>) || (<a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[tmpEtage-1]!=0)){
<a name="l00130"></a>00130             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00131"></a>00131          }
<a name="l00132"></a>00132          tmpEtage--;
<a name="l00133"></a>00133       }
<a name="l00134"></a>00134       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00135"></a>00135    }
<a name="l00136"></a>00136    
<a name="l00145"></a><a class="code" href="class_lift.html#a752adc2f4638138bc90f25e05500d92a">00145</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a752adc2f4638138bc90f25e05500d92a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">setFahrtwunsch</a>(<span class="keywordtype">int</span> Fahrtwunsch){
<a name="l00146"></a>00146       <span class="keywordflow">if</span> ((!<a class="code" href="class_lift.html#a9afe9ec0c8de171aab43962528c3ac84" title="gibt an, ob die Kabine sich bewegt">ismov</a>()) &amp;&amp; (<a class="code" href="class_lift.html#aa5edc87881e8ee3f661a42cdb2a6a7cd" title="gibt die aktuelle Etage zurück, in der sich die Kabine befindet.">getetage</a>()==Math.abs(Fahrtwunsch)))
<a name="l00147"></a>00147          <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00148"></a>00148       <span class="keywordflow">if</span>(Fahrtwunsch&lt;0)
<a name="l00149"></a>00149          <a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[-Fahrtwunsch-1]=<span class="keyword">true</span>;
<a name="l00150"></a>00150       <span class="keywordflow">else</span>
<a name="l00151"></a>00151          <a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[Fahrtwunsch-1]=<span class="keyword">true</span>;
<a name="l00152"></a>00152       
<a name="l00153"></a>00153       System.out.println(<span class="stringliteral">&quot;Fahrtwunsch:&quot;</span>+ Fahrtwunsch);
<a name="l00154"></a>00154       <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>==null &amp;&amp; <a class="code" href="class_lift.html#a73ae93ec883441df2c4bbb4629eab66f">overloadAction</a>==null){
<a name="l00155"></a>00155          <a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_cabine_drive_action.html" title="die Klasse der Ablaufsteuerung">CabineDriveAction</a>();
<a name="l00156"></a>00156          <a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>.start();
<a name="l00157"></a>00157       }  
<a name="l00158"></a>00158       
<a name="l00159"></a>00159       <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00160"></a>00160 
<a name="l00161"></a>00161    };
<a name="l00162"></a>00162    
<a name="l00168"></a><a class="code" href="class_lift.html#a9afe9ec0c8de171aab43962528c3ac84">00168</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a9afe9ec0c8de171aab43962528c3ac84" title="gibt an, ob die Kabine sich bewegt">ismov</a>(){
<a name="l00169"></a>00169       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a6e564a0132855e9598ce58fcfdaad5dd">bewegung</a>;
<a name="l00170"></a>00170    }
<a name="l00171"></a>00171    
<a name="l00177"></a><a class="code" href="class_lift.html#aa5edc87881e8ee3f661a42cdb2a6a7cd">00177</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#aa5edc87881e8ee3f661a42cdb2a6a7cd" title="gibt die aktuelle Etage zurück, in der sich die Kabine befindet.">getetage</a>(){
<a name="l00178"></a>00178       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>;
<a name="l00179"></a>00179    }
<a name="l00180"></a>00180    
<a name="l00186"></a><a class="code" href="class_lift.html#affdb5569975011b559998105148b7e06">00186</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#affdb5569975011b559998105148b7e06" title="gibt den Zustand der Türen zurück">getdoorcond</a>(){
<a name="l00187"></a>00187       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>;
<a name="l00188"></a>00188    }
<a name="l00189"></a>00189    
<a name="l00195"></a><a class="code" href="class_lift.html#a455d593390ac620a27dc4cd3794c5451">00195</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a455d593390ac620a27dc4cd3794c5451" title="gibt den Versatz der Kabine zurück">getBewegung</a>(){
<a name="l00196"></a>00196       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>;
<a name="l00197"></a>00197    }
<a name="l00198"></a>00198    
<a name="l00204"></a><a class="code" href="class_lift.html#ae05401f4554e01bea9d1956b4d3fdf91">00204</a>    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#ae05401f4554e01bea9d1956b4d3fdf91" title="leitet das öffnen der Türen ein">openDoors</a>(){
<a name="l00205"></a>00205       <span class="keywordflow">if</span>((<a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>!=null) &amp;&amp; (<a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>.isAlive()) ){
<a name="l00206"></a>00206          <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>.interrupt();
<a name="l00207"></a>00207       }
<a name="l00208"></a>00208       <span class="keywordflow">if</span>((<a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>==null) &amp;&amp; (!<a class="code" href="class_lift.html#a9afe9ec0c8de171aab43962528c3ac84" title="gibt an, ob die Kabine sich bewegt">ismov</a>())){ <span class="comment">//damit die Tür nicht wärend der Fahrt aufgeht</span>
<a name="l00209"></a>00209          <a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_door_open_action.html" title="die Klasse zum Öffnen der Türen (seperater Thread)">DoorOpenAction</a>();
<a name="l00210"></a>00210          <a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>.start();
<a name="l00211"></a>00211       }
<a name="l00212"></a>00212       
<a name="l00213"></a>00213    }
<a name="l00214"></a>00214    
<a name="l00220"></a><a class="code" href="class_lift.html#a687255d2bdce2ff161cf5130bd1ea579">00220</a>    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#a687255d2bdce2ff161cf5130bd1ea579" title="leitet das schließen der Türen ein">closeDoors</a>(){
<a name="l00221"></a>00221       <span class="keywordflow">if</span>((<a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>==null) &amp;&amp; (<a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>==null)){
<a name="l00222"></a>00222          <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>!=null){
<a name="l00223"></a>00223             <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>.interrupt();
<a name="l00224"></a>00224             <span class="comment">//das beschleunigte Abfahren wird hier eingeleitet</span>
<a name="l00225"></a>00225          }
<a name="l00226"></a>00226          <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_door_close_action.html" title="die Klasse zum Schließen der Türen (seperater Thread)">DoorCloseAction</a>();
<a name="l00227"></a>00227          <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>.start();
<a name="l00228"></a>00228       }
<a name="l00229"></a>00229    }
<a name="l00230"></a>00230    
<a name="l00243"></a><a class="code" href="class_lift.html#a927fe61421095dae7e4ee31755e494a9">00243</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a927fe61421095dae7e4ee31755e494a9" title="verbucht die Personen die zusteigen">addPeopleandreturnCarry</a>(<span class="keywordtype">int</span> <a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>, <span class="keywordtype">int</span> newpeople){
<a name="l00244"></a>00244       <a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>=<a class="code" href="class_lift.html#abb9a1d776ddfc735d70e2c278dc3cea9" title="gibt die Anzahl aller Personen, die sich im Fahrstuhl befinden zurück">getAllPeople</a>()+newpeople-<a class="code" href="class_lift.html#a0cad9b68208b05d4580777ee3c7c27bc">overloadborder</a>&gt;0?<a class="code" href="class_lift.html#abb9a1d776ddfc735d70e2c278dc3cea9" title="gibt die Anzahl aller Personen, die sich im Fahrstuhl befinden zurück">getAllPeople</a>()+newpeople-<a class="code" href="class_lift.html#a0cad9b68208b05d4580777ee3c7c27bc">overloadborder</a>:0;
<a name="l00245"></a>00245       newpeople-=<a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>;
<a name="l00246"></a>00246       <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[Etage-1]+=newpeople;
<a name="l00247"></a>00247       <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>==null){
<a name="l00248"></a>00248          <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_interrupt_action.html" title="Der Ablauf für den Countdown.">InterruptAction</a>();
<a name="l00249"></a>00249          <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>.start();
<a name="l00250"></a>00250       }  
<a name="l00251"></a>00251       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>;
<a name="l00252"></a>00252    }
<a name="l00253"></a>00253    
<a name="l00259"></a><a class="code" href="class_lift.html#abb9a1d776ddfc735d70e2c278dc3cea9">00259</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#abb9a1d776ddfc735d70e2c278dc3cea9" title="gibt die Anzahl aller Personen, die sich im Fahrstuhl befinden zurück">getAllPeople</a>(){
<a name="l00260"></a>00260       <span class="keywordtype">int</span> sum=0;
<a name="l00261"></a>00261       <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt;9; i++){
<a name="l00262"></a>00262          sum+=<a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[i];
<a name="l00263"></a>00263       }
<a name="l00264"></a>00264       <span class="keywordflow">return</span> sum+<a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>;
<a name="l00265"></a>00265    }
<a name="l00266"></a>00266    
<a name="l00272"></a><a class="code" href="class_lift.html#af2e5850f5d0e57f4c191737cab1ca43a">00272</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#af2e5850f5d0e57f4c191737cab1ca43a" title="gibt die (letzte) Fahrtrichtung zurück">getdriveup</a>(){
<a name="l00273"></a>00273       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>;
<a name="l00274"></a>00274    }
<a name="l00275"></a>00275    
<a name="l00283"></a><a class="code" href="class_lift.html#a86663c2d019c68bdc97fe0969818d89b">00283</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#a86663c2d019c68bdc97fe0969818d89b" title="gibt die Zeit in sec zurück, die der Fahrstuhl noch wartet, bis er die Türen das nächste mal schließt...">getInterruptTime</a>(){
<a name="l00284"></a>00284       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#ab29c7e8ef3faea551eb5ef24bb3c7125">time</a>;
<a name="l00285"></a>00285    }
<a name="l00286"></a>00286    
<a name="l00294"></a><a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119">00294</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>(<span class="keywordtype">int</span> sec){
<a name="l00295"></a>00295       <a class="code" href="class_lift.html#ab29c7e8ef3faea551eb5ef24bb3c7125">time</a>=sec;
<a name="l00296"></a>00296    }
<a name="l00297"></a>00297    
<a name="l00303"></a><a class="code" href="class_lift.html#a481798a7689451a521044d450f8133a4">00303</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a481798a7689451a521044d450f8133a4" title="gibt das timeinterrupt-Flag zurück">gettimeinterruptflag</a>(){
<a name="l00304"></a>00304       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a97537e6a914809b5f46d91288a65561c">timeinterruptflag</a>;
<a name="l00305"></a>00305    }
<a name="l00306"></a>00306    
<a name="l00315"></a><a class="code" href="class_lift.html#ad21c633f0d880b0c907700eb90222286">00315</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#ad21c633f0d880b0c907700eb90222286" title="setzt das timeinterrupt-Flag zurück">settimeinterruptflag</a>(<span class="keywordtype">boolean</span> flag){
<a name="l00316"></a>00316       <a class="code" href="class_lift.html#a97537e6a914809b5f46d91288a65561c">timeinterruptflag</a>=flag;
<a name="l00317"></a>00317    }
<a name="l00318"></a>00318    
<a name="l00327"></a><a class="code" href="class_lift.html#a132578b1347537e18a4343aa6b5d2144">00327</a>    <span class="keyword">private</span> <span class="keyword">synchronized</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#a132578b1347537e18a4343aa6b5d2144" title="setzt die Anzahl der Personen, die zu viel sind">setshowOverloadwith</a>(<span class="keywordtype">int</span> people){
<a name="l00328"></a>00328       <a class="code" href="class_lift.html#a268968b53ed0097ca8959929fdcf3662">showOverloadwithpeople</a>=people;
<a name="l00329"></a>00329    }
<a name="l00330"></a>00330    
<a name="l00338"></a><a class="code" href="class_lift.html#af93614bf6409a29bb3f97d1ab5709460">00338</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">int</span> <a class="code" href="class_lift.html#af93614bf6409a29bb3f97d1ab5709460" title="holt die Anzahl der Personen, die zu viel sind">getshowOverloadwithPeople</a>(){
<a name="l00339"></a>00339       <span class="keywordtype">int</span> tmp=<a class="code" href="class_lift.html#a268968b53ed0097ca8959929fdcf3662">showOverloadwithpeople</a>;
<a name="l00340"></a>00340       <a class="code" href="class_lift.html#a268968b53ed0097ca8959929fdcf3662">showOverloadwithpeople</a>=0;
<a name="l00341"></a>00341       <span class="keywordflow">return</span> tmp; 
<a name="l00342"></a>00342    }
<a name="l00343"></a>00343    
<a name="l00349"></a><a class="code" href="class_lift.html#a69c13eae27d1b88e1c017de0131d98d7">00349</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a69c13eae27d1b88e1c017de0131d98d7" title="Überlast-Anzeige-Flag Abfrage.">getDisplayOverload</a>(){
<a name="l00350"></a>00350       <span class="keywordflow">return</span> <a class="code" href="class_lift.html#a1c4c16afa36ab041a47cfda5cffdb948">displayoverload</a>;
<a name="l00351"></a>00351    }
<a name="l00352"></a>00352    
<a name="l00360"></a><a class="code" href="class_lift.html#aaeb3f41796e3fcc2c6d01b353639c5bd">00360</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#aaeb3f41796e3fcc2c6d01b353639c5bd" title="Überlast-Anzeige-Flag setzen/zurücksetzen.">setDisplayOverload</a>(<span class="keywordtype">boolean</span> flag){
<a name="l00361"></a>00361       <a class="code" href="class_lift.html#a1c4c16afa36ab041a47cfda5cffdb948">displayoverload</a>=flag;
<a name="l00362"></a>00362    }  
<a name="l00363"></a>00363    
<a name="l00371"></a><a class="code" href="class_lift.html#aecb9e4279248cfcfce3a00e0b5f54cdd">00371</a>    <span class="keyword">public</span> <span class="keyword">synchronized</span> <span class="keywordtype">void</span> <a class="code" href="class_lift.html#aecb9e4279248cfcfce3a00e0b5f54cdd" title="startet die Überlast-Routine">startoverloadroutine</a>(<span class="keywordtype">int</span> <a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>){
<a name="l00372"></a>00372       <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>(-1);
<a name="l00373"></a>00373       sound.Machine.playSound(<span class="stringliteral">&quot;overload.wav&quot;</span>);
<a name="l00374"></a>00374       <a class="code" href="class_lift.html#a73ae93ec883441df2c4bbb4629eab66f">overloadAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_overload_action.html" title="die Klasse für die Überlastbehandlung, sie läuft als seperater Thread">OverloadAction</a>(Carry);
<a name="l00375"></a>00375       <a class="code" href="class_lift.html#a73ae93ec883441df2c4bbb4629eab66f">overloadAction</a>.start();
<a name="l00376"></a>00376    }
<a name="l00377"></a>00377    
<a name="l00383"></a><a class="code" href="class_lift.html#a777eed0a04e81d5c5a006b9b1f3ff94e">00383</a>    <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift.html#a777eed0a04e81d5c5a006b9b1f3ff94e" title="stellt fest, ob in der aktuellen Etage angehalten werden muss">mussichanhalten</a>(){
<a name="l00384"></a>00384       <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>){
<a name="l00385"></a>00385          <span class="keywordflow">if</span> (<a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1] || <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]!=0){
<a name="l00386"></a>00386             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00387"></a>00387          }
<a name="l00388"></a>00388          <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]){
<a name="l00389"></a>00389             <span class="comment">//wenn keine fahrtwünsche darüber sind --&gt; true else false</span>
<a name="l00390"></a>00390             <span class="keywordflow">if</span> (<a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">isARequestoverme</a>()){
<a name="l00391"></a>00391                <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00392"></a>00392             }
<a name="l00393"></a>00393             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00394"></a>00394          }
<a name="l00395"></a>00395          <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00396"></a>00396       }<span class="keywordflow">else</span>{
<a name="l00397"></a>00397          <span class="keywordflow">if</span> (<a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1] || <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]!=0){
<a name="l00398"></a>00398             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00399"></a>00399          }
<a name="l00400"></a>00400          <span class="keywordflow">if</span> (<a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]){
<a name="l00401"></a>00401             <span class="comment">//wenn keine fahrtwünsche darunter sind --&gt; true else false</span>
<a name="l00402"></a>00402             <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>())
<a name="l00403"></a>00403                <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00404"></a>00404             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00405"></a>00405          }
<a name="l00406"></a>00406          <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00407"></a>00407       }
<a name="l00408"></a>00408    }
<a name="l00409"></a>00409    
<a name="l00418"></a><a class="code" href="class_lift_1_1_cabine_drive_action.html">00418</a>    <span class="keyword">class </span><a class="code" href="class_lift_1_1_cabine_drive_action.html" title="die Klasse der Ablaufsteuerung">CabineDriveAction</a> <span class="keyword">extends</span> Thread {
<a name="l00419"></a><a class="code" href="class_lift_1_1_cabine_drive_action.html#aa7e26b75b57be0d7724a306c20f40731">00419</a>       <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift_1_1_cabine_drive_action.html#aa7e26b75b57be0d7724a306c20f40731">dontplay</a>;
<a name="l00420"></a><a class="code" href="class_lift_1_1_cabine_drive_action.html#a794beb46273dc7b65cb970f1afc1e9cc">00420</a>       <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift_1_1_cabine_drive_action.html#a794beb46273dc7b65cb970f1afc1e9cc">run</a>(){
<a name="l00421"></a>00421          <span class="keywordflow">while</span>(<span class="keyword">true</span>){
<a name="l00422"></a>00422             <a class="code" href="class_lift_1_1_cabine_drive_action.html#aa7e26b75b57be0d7724a306c20f40731">dontplay</a>=<span class="keyword">true</span>; <span class="comment">//wenn der Lift losfährt muss nichts abgespielt werden</span>
<a name="l00423"></a>00423             <span class="keywordflow">while</span>(<a class="code" href="class_lift.html#affdb5569975011b559998105148b7e06" title="gibt den Zustand der Türen zurück">getdoorcond</a>()!=0){
<a name="l00424"></a>00424                <a class="code" href="class_lift.html#a687255d2bdce2ff161cf5130bd1ea579" title="leitet das schließen der Türen ein">closeDoors</a>();
<a name="l00425"></a>00425                <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>!=null){
<a name="l00426"></a>00426                   <span class="keywordflow">try</span> {
<a name="l00427"></a>00427                      <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>.join();
<a name="l00428"></a>00428                   } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00429"></a>00429                      <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00430"></a>00430                      e.printStackTrace();
<a name="l00431"></a>00431                   }
<a name="l00432"></a>00432                   <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>.<a class="code" href="class_lift_1_1_door_close_action.html#adb96a4f49d0c3da75178c83f1c548ec8">wasinterrupted</a>()){ <span class="comment">//feststellen, ob das Türen schließen abgebrochen wurde.</span>
<a name="l00433"></a>00433                      System.out.println(<span class="stringliteral">&quot;Türen-Schließen wurde abgebrochen.&quot;</span>);
<a name="l00434"></a>00434                      <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>=null;
<a name="l00435"></a>00435                      <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_interrupt_action.html" title="Der Ablauf für den Countdown.">InterruptAction</a>();
<a name="l00436"></a>00436                      <span class="comment">// warten, bis die Türen auf sind</span>
<a name="l00437"></a>00437                      <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>!=null){
<a name="l00438"></a>00438                         <span class="keywordflow">try</span> {
<a name="l00439"></a>00439                            <a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>.join();
<a name="l00440"></a>00440                         } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00441"></a>00441                            <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00442"></a>00442                            e.printStackTrace();
<a name="l00443"></a>00443                         }
<a name="l00444"></a>00444                      }
<a name="l00445"></a>00445                      <span class="comment">//den Countdown erneut starten</span>
<a name="l00446"></a>00446                      <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>.start();
<a name="l00447"></a>00447                      <span class="keywordflow">try</span> {
<a name="l00448"></a>00448                         <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>.join();
<a name="l00449"></a>00449                      } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00450"></a>00450                         <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00451"></a>00451                         e.printStackTrace();
<a name="l00452"></a>00452                      }
<a name="l00453"></a>00453                   }<span class="keywordflow">else</span>{
<a name="l00454"></a>00454                      <a class="code" href="class_lift.html#afb3f3276a6600bb98b01c0ea8c990d61">doorcloseAction</a>=null;
<a name="l00455"></a>00455                      System.out.println(<span class="stringliteral">&quot;Türen-Schließen wurde nicht abgebrochen.&quot;</span>);
<a name="l00456"></a>00456                   }
<a name="l00457"></a>00457                      
<a name="l00458"></a>00458                }
<a name="l00459"></a>00459                
<a name="l00460"></a>00460             }
<a name="l00461"></a>00461             <a class="code" href="class_lift.html#a6e564a0132855e9598ce58fcfdaad5dd">bewegung</a>=<span class="keyword">true</span>;
<a name="l00462"></a>00462             
<a name="l00463"></a>00463             <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">isARequestoverme</a>() &amp;&amp; !<a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>()){
<a name="l00464"></a>00464                <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>=<span class="keyword">true</span>;
<a name="l00465"></a>00465             }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(!<a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">isARequestoverme</a>() &amp;&amp; <a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>())
<a name="l00466"></a>00466                <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>=<span class="keyword">false</span>;
<a name="l00467"></a>00467             
<a name="l00468"></a>00468             <span class="keywordflow">while</span>(!isInterrupted() &amp;&amp; 
<a name="l00469"></a>00469                (
<a name="l00470"></a>00470                ((<a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>==<span class="keyword">true</span>) &amp;&amp; ((<a class="code" href="class_lift.html#a455d593390ac620a27dc4cd3794c5451" title="gibt den Versatz der Kabine zurück">getBewegung</a>()!=0) || (!<a class="code" href="class_lift.html#a777eed0a04e81d5c5a006b9b1f3ff94e" title="stellt fest, ob in der aktuellen Etage angehalten werden muss">mussichanhalten</a>())))  || 
<a name="l00471"></a>00471                ((<a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>==<span class="keyword">false</span>) &amp;&amp; ((<a class="code" href="class_lift.html#a455d593390ac620a27dc4cd3794c5451" title="gibt den Versatz der Kabine zurück">getBewegung</a>()!=0) || (!<a class="code" href="class_lift.html#a777eed0a04e81d5c5a006b9b1f3ff94e" title="stellt fest, ob in der aktuellen Etage angehalten werden muss">mussichanhalten</a>())))
<a name="l00472"></a>00472                )
<a name="l00473"></a>00473                ){ <span class="comment">//Bewegung muss ausgewertet werden, sonst kann man eine vorbeigefahrene Kabine anhalten</span>
<a name="l00474"></a>00474                
<a name="l00475"></a>00475                <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>){
<a name="l00476"></a>00476                   <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>++;
<a name="l00477"></a>00477                
<a name="l00478"></a>00478                   <span class="keywordflow">if</span> (<a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>==40){
<a name="l00479"></a>00479                      <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>=0; 
<a name="l00480"></a>00480                      <a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>++;
<a name="l00481"></a>00481                      <span class="keywordflow">if</span>(!<a class="code" href="class_lift.html#a777eed0a04e81d5c5a006b9b1f3ff94e" title="stellt fest, ob in der aktuellen Etage angehalten werden muss">mussichanhalten</a>())
<a name="l00482"></a>00482                      sound.Machine.playSound(<span class="stringliteral">&quot;fahrt.wav&quot;</span>);
<a name="l00483"></a>00483                      
<a name="l00484"></a>00484                   }
<a name="l00485"></a>00485                }<span class="keywordflow">else</span>{
<a name="l00486"></a>00486                   <span class="keywordflow">if</span> (<a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>==0){
<a name="l00487"></a>00487                      <span class="keywordflow">if</span>(!<a class="code" href="class_lift_1_1_cabine_drive_action.html#aa7e26b75b57be0d7724a306c20f40731">dontplay</a>){
<a name="l00488"></a>00488                         sound.Machine.playSound(<span class="stringliteral">&quot;fahrt.wav&quot;</span>);
<a name="l00489"></a>00489                      }
<a name="l00490"></a>00490                         <a class="code" href="class_lift_1_1_cabine_drive_action.html#aa7e26b75b57be0d7724a306c20f40731">dontplay</a>=<span class="keyword">false</span>;
<a name="l00491"></a>00491                      
<a name="l00492"></a>00492                         
<a name="l00493"></a>00493                      <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>=40;
<a name="l00494"></a>00494                      <a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>--;
<a name="l00495"></a>00495                   }
<a name="l00496"></a>00496                   <a class="code" href="class_lift.html#ad34e24d32574a98b0988ecab9cb9084a">pos</a>--;
<a name="l00497"></a>00497                }
<a name="l00498"></a>00498                <span class="keywordflow">try</span> {
<a name="l00499"></a>00499                   Thread.sleep(125);
<a name="l00500"></a>00500                } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00501"></a>00501                   <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00502"></a>00502                   e.printStackTrace();
<a name="l00503"></a>00503                } 
<a name="l00504"></a>00504             }
<a name="l00505"></a>00505             sound.Machine.playSound(<span class="stringliteral">&quot;arrive.wav&quot;</span>);
<a name="l00506"></a>00506             <span class="keywordflow">try</span> {
<a name="l00507"></a>00507                Thread.sleep(3500); <span class="comment">//Zwischen Anhalten und Türöffnung</span>
<a name="l00508"></a>00508             } <span class="keywordflow">catch</span> (InterruptedException e1) {
<a name="l00509"></a>00509                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00510"></a>00510                e1.printStackTrace();
<a name="l00511"></a>00511             }
<a name="l00512"></a>00512             <a class="code" href="class_lift.html#a6e564a0132855e9598ce58fcfdaad5dd">bewegung</a>=<span class="keyword">false</span>;
<a name="l00513"></a>00513             <a class="code" href="class_lift.html#ae05401f4554e01bea9d1956b4d3fdf91" title="leitet das öffnen der Türen ein">openDoors</a>();
<a name="l00514"></a>00514             
<a name="l00515"></a>00515             <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>){
<a name="l00516"></a>00516                <a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]=<span class="keyword">false</span>;
<a name="l00517"></a>00517                <a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]=<span class="keyword">false</span>;
<a name="l00518"></a>00518             }<span class="keywordflow">else</span>{
<a name="l00519"></a>00519                <a class="code" href="class_lift.html#a3ce2b4d2a9e884d67057187c279546e1">runter</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]=<span class="keyword">false</span>;
<a name="l00520"></a>00520                <a class="code" href="class_lift.html#ad26345905f8a5aff3f9f668e81100d17">hoch</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]=<span class="keyword">false</span>;
<a name="l00521"></a>00521             }
<a name="l00522"></a>00522             <span class="keywordflow">try</span> {
<a name="l00523"></a>00523                Thread.sleep(2000); <span class="comment">//Damit der Lift nach Ankunft nich sofort leer ist, wenn alle aussteigen</span>
<a name="l00524"></a>00524             } <span class="keywordflow">catch</span> (InterruptedException e2) {
<a name="l00525"></a>00525                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00526"></a>00526                e2.printStackTrace();
<a name="l00527"></a>00527             }  
<a name="l00528"></a>00528             
<a name="l00529"></a>00529             System.out.println(<span class="stringliteral">&quot;Es steigen &quot;</span>+<a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]+<span class="stringliteral">&quot; Personen aus.&quot;</span>);
<a name="l00530"></a>00530             <a class="code" href="class_lift.html#a95a4532e36ffcbb28ad98fae5c109629">peoplerequest</a>[<a class="code" href="class_lift.html#a4580a9b8aada076efdb646d050b47945">Etage</a>-1]=0;
<a name="l00531"></a>00531             <span class="keywordflow">try</span> {
<a name="l00532"></a>00532                <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>!=null)
<a name="l00533"></a>00533                   <a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>.join();  <span class="comment">//falls die Türen noch nicht vollständig geöffnet sind, wird hier gewartet.</span>
<a name="l00534"></a>00534             } <span class="keywordflow">catch</span> (InterruptedException e1) {
<a name="l00535"></a>00535                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00536"></a>00536                e1.printStackTrace();
<a name="l00537"></a>00537             }
<a name="l00538"></a>00538             <span class="comment">//darauf warten, dass die Zeit Abgelaufen ist.</span>
<a name="l00539"></a>00539             <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">isARequestoverme</a>() || <a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>()){
<a name="l00540"></a>00540                <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_interrupt_action.html" title="Der Ablauf für den Countdown.">InterruptAction</a>();
<a name="l00541"></a>00541                <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>.start();
<a name="l00542"></a>00542                <span class="keywordflow">try</span> {
<a name="l00543"></a>00543                   <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>.join();
<a name="l00544"></a>00544                } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00545"></a>00545                   <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00546"></a>00546                   e.printStackTrace();
<a name="l00547"></a>00547                }
<a name="l00548"></a>00548                <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>(-1); <span class="comment">//damit das label weg geht </span>
<a name="l00549"></a>00549                <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>=null;
<a name="l00550"></a>00550             }
<a name="l00551"></a>00551             <span class="comment">/*try {</span>
<a name="l00552"></a>00552 <span class="comment">               Thread.sleep(4000);</span>
<a name="l00553"></a>00553 <span class="comment">            } catch (InterruptedException e) {</span>
<a name="l00554"></a>00554 <span class="comment">               // TODO Auto-generated catch block</span>
<a name="l00555"></a>00555 <span class="comment">               e.printStackTrace();</span>
<a name="l00556"></a>00556 <span class="comment">            }*/</span>
<a name="l00557"></a>00557             
<a name="l00558"></a>00558             <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a75ad234d80d11f541d4dac8aa126ca8a" title="stellt fest ob die Fahrkabine noch (weiter) nach oben fahren muss.">isARequestoverme</a>()){
<a name="l00559"></a>00559                <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>()){
<a name="l00560"></a>00560                   
<a name="l00561"></a>00561                }<span class="keywordflow">else</span>{
<a name="l00562"></a>00562                   <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>=<span class="keyword">true</span>;
<a name="l00563"></a>00563                }
<a name="l00564"></a>00564             }<span class="keywordflow">else</span>{
<a name="l00565"></a>00565                <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#ae2d8348dea36ba040125aac9f00e25dd" title="stellt fest ob die Fahrkabine noch (weiter) nach unten fahren muss.">isARequestunderme</a>()){
<a name="l00566"></a>00566                   <a class="code" href="class_lift.html#a23b1c1c46e34ade166f3880f60027669">driveup</a>=<span class="keyword">false</span>;
<a name="l00567"></a>00567                }<span class="keywordflow">else</span>{
<a name="l00568"></a>00568                   <span class="keywordflow">break</span>;
<a name="l00569"></a>00569                }
<a name="l00570"></a>00570             }
<a name="l00571"></a>00571             System.out.print(<span class="stringliteral">&quot;Next Loop&quot;</span>);
<a name="l00572"></a>00572          }
<a name="l00573"></a>00573          <a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>=null;
<a name="l00574"></a>00574       }
<a name="l00575"></a>00575    }
<a name="l00576"></a>00576    
<a name="l00577"></a>00577    
<a name="l00587"></a><a class="code" href="class_lift_1_1_interrupt_action.html">00587</a>    <span class="keyword">class </span><a class="code" href="class_lift_1_1_interrupt_action.html" title="Der Ablauf für den Countdown.">InterruptAction</a> <span class="keyword">extends</span> Thread{
<a name="l00588"></a><a class="code" href="class_lift_1_1_interrupt_action.html#a6b7e2097664aa92cb5bb40518735cb87">00588</a>       <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift_1_1_interrupt_action.html#a6b7e2097664aa92cb5bb40518735cb87">run</a>(){
<a name="l00589"></a>00589          <span class="keywordtype">boolean</span> restart=<span class="keyword">true</span>;
<a name="l00590"></a>00590          <span class="keywordtype">int</span> interntime=5000;
<a name="l00591"></a>00591          <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>(4);
<a name="l00592"></a>00592          System.out.println(<span class="stringliteral">&quot;Interrupt&quot;</span>);
<a name="l00593"></a>00593          <span class="keywordflow">while</span>((!isInterrupted()) &amp;&amp; (interntime&gt;0)){
<a name="l00594"></a>00594             <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#a481798a7689451a521044d450f8133a4" title="gibt das timeinterrupt-Flag zurück">gettimeinterruptflag</a>()){
<a name="l00595"></a>00595                restart=<span class="keyword">true</span>;
<a name="l00596"></a>00596             }<span class="keywordflow">else</span>{
<a name="l00597"></a>00597                <span class="keywordflow">if</span> (restart){
<a name="l00598"></a>00598                   restart=<span class="keyword">false</span>;
<a name="l00599"></a>00599                   interntime=5000;
<a name="l00600"></a>00600                   <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>(4);
<a name="l00601"></a>00601                }
<a name="l00602"></a>00602                interntime-=100;
<a name="l00603"></a>00603                <span class="keywordflow">if</span>(interntime%1000==0){
<a name="l00604"></a>00604                   <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>((interntime-1000)/1000);
<a name="l00605"></a>00605                }
<a name="l00606"></a>00606             }
<a name="l00607"></a>00607             <span class="keywordflow">try</span> {
<a name="l00608"></a>00608                Thread.sleep(100);
<a name="l00609"></a>00609             } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00610"></a>00610                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00611"></a>00611                e.printStackTrace();
<a name="l00612"></a>00612                <span class="keywordflow">break</span>;
<a name="l00613"></a>00613             } 
<a name="l00614"></a>00614          }
<a name="l00615"></a>00615          <span class="keywordflow">if</span>(<a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>==null){
<a name="l00616"></a>00616             <a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>=<span class="keyword">new</span> <a class="code" href="class_lift_1_1_cabine_drive_action.html" title="die Klasse der Ablaufsteuerung">CabineDriveAction</a>();
<a name="l00617"></a>00617             <a class="code" href="class_lift.html#aba7ccbfa7b53ab19fd0e62bccf56f59e">cabinedriveAction</a>.start();
<a name="l00618"></a>00618          }
<a name="l00619"></a>00619          <a class="code" href="class_lift.html#a2558cdcb0ff89e9be3fd42642b8cdf30">interruptAction</a>=null;
<a name="l00620"></a>00620       }
<a name="l00621"></a>00621    }
<a name="l00622"></a>00622    
<a name="l00630"></a><a class="code" href="class_lift_1_1_overload_action.html">00630</a>    <span class="keyword">class </span><a class="code" href="class_lift_1_1_overload_action.html" title="die Klasse für die Überlastbehandlung, sie läuft als seperater Thread">OverloadAction</a> <span class="keyword">extends</span> Thread{
<a name="l00631"></a><a class="code" href="class_lift_1_1_overload_action.html#a9a8360ce83eefd2f047c19b85922c46e">00631</a>       <span class="keyword">private</span> <span class="keywordtype">int</span> <a class="code" href="class_lift_1_1_overload_action.html#a9a8360ce83eefd2f047c19b85922c46e">people</a>; 
<a name="l00632"></a><a class="code" href="class_lift_1_1_overload_action.html#a363117ba1d1c0a35d4be352861733bd4">00632</a>       <span class="keyword">public</span> <a class="code" href="class_lift_1_1_overload_action.html#a363117ba1d1c0a35d4be352861733bd4">OverloadAction</a>(<span class="keywordtype">int</span> i) {
<a name="l00633"></a>00633          super();
<a name="l00634"></a>00634          <a class="code" href="class_lift_1_1_overload_action.html#a9a8360ce83eefd2f047c19b85922c46e">people</a>=i;
<a name="l00635"></a>00635          
<a name="l00636"></a>00636       }
<a name="l00637"></a>00637       
<a name="l00638"></a><a class="code" href="class_lift_1_1_overload_action.html#adb6d128a78cddc69a36b1156b7e335e7">00638</a>       <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift_1_1_overload_action.html#adb6d128a78cddc69a36b1156b7e335e7">run</a>(){
<a name="l00639"></a>00639          <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt;3 &amp;&amp; (!isInterrupted()); i++){
<a name="l00640"></a>00640             <a class="code" href="class_lift.html#aaeb3f41796e3fcc2c6d01b353639c5bd" title="Überlast-Anzeige-Flag setzen/zurücksetzen.">setDisplayOverload</a>(<span class="keyword">true</span>);
<a name="l00641"></a>00641             <span class="keywordflow">try</span> {
<a name="l00642"></a>00642                Thread.sleep(750);
<a name="l00643"></a>00643             } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00644"></a>00644                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00645"></a>00645                e.printStackTrace();
<a name="l00646"></a>00646             }
<a name="l00647"></a>00647             <a class="code" href="class_lift.html#aaeb3f41796e3fcc2c6d01b353639c5bd" title="Überlast-Anzeige-Flag setzen/zurücksetzen.">setDisplayOverload</a>(<span class="keyword">false</span>);
<a name="l00648"></a>00648             <span class="keywordflow">try</span> {
<a name="l00649"></a>00649                Thread.sleep(500);
<a name="l00650"></a>00650             } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00651"></a>00651                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00652"></a>00652                e.printStackTrace();
<a name="l00653"></a>00653             }
<a name="l00654"></a>00654          }
<a name="l00655"></a>00655          
<a name="l00656"></a>00656           <a class="code" href="class_lift.html#a132578b1347537e18a4343aa6b5d2144" title="setzt die Anzahl der Personen, die zu viel sind">setshowOverloadwith</a>(<a class="code" href="class_lift_1_1_overload_action.html#a9a8360ce83eefd2f047c19b85922c46e">people</a>);
<a name="l00657"></a>00657           <a class="code" href="class_lift.html#ac35ba2b499faacda00a79a05fe43aec9">Carry</a>=0;
<a name="l00658"></a>00658       }
<a name="l00659"></a>00659    }
<a name="l00660"></a>00660    
<a name="l00661"></a>00661    
<a name="l00670"></a><a class="code" href="class_lift_1_1_door_close_action.html">00670</a>    <span class="keyword">class </span><a class="code" href="class_lift_1_1_door_close_action.html" title="die Klasse zum Schließen der Türen (seperater Thread)">DoorCloseAction</a> <span class="keyword">extends</span> Thread{
<a name="l00671"></a>00671       
<a name="l00672"></a><a class="code" href="class_lift_1_1_door_close_action.html#a18e28073bef38580792e60a1dcf92abb">00672</a>       <span class="keyword">private</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift_1_1_door_close_action.html#a18e28073bef38580792e60a1dcf92abb">interrupted</a>;
<a name="l00673"></a>00673       
<a name="l00674"></a><a class="code" href="class_lift_1_1_door_close_action.html#ad4da05ac9736ca20cd50ed16875498bc">00674</a>       <a class="code" href="class_lift_1_1_door_close_action.html#ad4da05ac9736ca20cd50ed16875498bc">DoorCloseAction</a>(){
<a name="l00675"></a>00675          <a class="code" href="class_lift_1_1_door_close_action.html#a18e28073bef38580792e60a1dcf92abb">interrupted</a>=<span class="keyword">false</span>;
<a name="l00676"></a>00676       }
<a name="l00677"></a>00677       
<a name="l00678"></a><a class="code" href="class_lift_1_1_door_close_action.html#adb96a4f49d0c3da75178c83f1c548ec8">00678</a>       <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="class_lift_1_1_door_close_action.html#adb96a4f49d0c3da75178c83f1c548ec8">wasinterrupted</a>(){
<a name="l00679"></a>00679          <span class="keywordflow">return</span> <a class="code" href="class_lift_1_1_door_close_action.html#a18e28073bef38580792e60a1dcf92abb">interrupted</a>;
<a name="l00680"></a>00680       }
<a name="l00681"></a>00681       
<a name="l00682"></a><a class="code" href="class_lift_1_1_door_close_action.html#a65cf7abeea84d8a5a88c7d5f398c902e">00682</a>       <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift_1_1_door_close_action.html#a65cf7abeea84d8a5a88c7d5f398c902e">run</a>(){
<a name="l00683"></a>00683          <a class="code" href="class_lift.html#a6762e4847ac218c8bc4771e7498f3119" title="setzt die Wartezeit">setInterruptTime</a>(-1);
<a name="l00684"></a>00684          <span class="keywordflow">while</span>((!<a class="code" href="class_lift_1_1_door_close_action.html#adb96a4f49d0c3da75178c83f1c548ec8">wasinterrupted</a>()) &amp;&amp; (<a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>&gt;0)){
<a name="l00685"></a>00685             <a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>--;
<a name="l00686"></a>00686             <span class="keywordflow">try</span> {
<a name="l00687"></a>00687                Thread.sleep(50);
<a name="l00688"></a>00688             } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00689"></a>00689                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00690"></a>00690                <a class="code" href="class_lift_1_1_door_close_action.html#a18e28073bef38580792e60a1dcf92abb">interrupted</a>=<span class="keyword">true</span>;
<a name="l00691"></a>00691                e.printStackTrace();
<a name="l00692"></a>00692                <span class="keywordflow">break</span>;
<a name="l00693"></a>00693             } 
<a name="l00694"></a>00694             <span class="keywordflow">if</span> (isInterrupted()){
<a name="l00695"></a>00695                <a class="code" href="class_lift_1_1_door_close_action.html#a18e28073bef38580792e60a1dcf92abb">interrupted</a>=<span class="keyword">true</span>;
<a name="l00696"></a>00696             }
<a name="l00697"></a>00697          }
<a name="l00698"></a>00698       }
<a name="l00699"></a>00699    }
<a name="l00700"></a>00700 
<a name="l00709"></a><a class="code" href="class_lift_1_1_door_open_action.html">00709</a>    <span class="keyword">class </span><a class="code" href="class_lift_1_1_door_open_action.html" title="die Klasse zum Öffnen der Türen (seperater Thread)">DoorOpenAction</a> <span class="keyword">extends</span> Thread{
<a name="l00710"></a><a class="code" href="class_lift_1_1_door_open_action.html#a53f13cecb5af8aca9d460bd55b6a18ee">00710</a>       <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_lift_1_1_door_open_action.html#a53f13cecb5af8aca9d460bd55b6a18ee">run</a>(){
<a name="l00711"></a>00711          <span class="keywordflow">while</span>((!isInterrupted()) &amp;&amp; (<a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>&lt;40)){
<a name="l00712"></a>00712             <a class="code" href="class_lift.html#a23e99e287715b7b0fbb7053c5515cbfb">door</a>++;
<a name="l00713"></a>00713             <span class="keywordflow">try</span> {
<a name="l00714"></a>00714                Thread.sleep(50);
<a name="l00715"></a>00715             } <span class="keywordflow">catch</span> (InterruptedException e) {
<a name="l00716"></a>00716                <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00717"></a>00717                e.printStackTrace();
<a name="l00718"></a>00718             } 
<a name="l00719"></a>00719          }
<a name="l00720"></a>00720          <a class="code" href="class_lift.html#aaf3ed8eeb7277e7ae375ed70b35178a4">dooropenAction</a>=null;
<a name="l00721"></a>00721       }
<a name="l00722"></a>00722    }
<a name="l00723"></a>00723 }
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Erzeugt am Fre Jul 6 2012 16:05:55 für LiftSimu von &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
